#coding=utf-8
import serial
import time
if __name__ == "__main__":
    ser=serial.Serial("/dev/pts/1",9600,timeout=0.5) #使用USB连接串行口
    while(True):
        t=ser.readline()
        print(t)
        time.sleep(1)
    ser.close()#关闭端口
